package org.rooster.genetic;

import org.jgap.IChromosome;

/**
 * Created by IntelliJ IDEA.
 * User: manorama
 * Date: 6/5/12
 * Time: 6:33 PM
 * To change this template use File | Settings | File Templates.
 */

/**
 * This interface defines the generic rule
 *
 * The method fitnessValueForRule should include
 * the implementation details of the rule
 *
 * The method should include the algorithm to calculate
 * the fitness of the chromosome against the rule
 *
 *
 */
public interface GenericRule {

    /**
     * Returns the calculated fitness value for rule
     * @param chromosome
     * @return
     */
    public double fitnessValueForRule(IChromosome chromosome);

    /**
     * return the weightage given to rule
     * This is corresponding to the importance of the rule
     * @return
     */
    public int getWeight();

    /**
     * set the weight for the rule
     * This is corresponding to the importance of the rule
     * @param value
     */
    public void setWeight(int value);
}
